package com.ia.aistream.service.common.impl;

import com.ia.aistream.manager.common.ICommonFileManager;
import com.ia.aistream.model.common.entity.CommonFile;
import com.ia.aistream.service.common.ICommonFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * Author: xiaoyu
 * Date: 2020/12/16 10:11
 */
@Service
public class CommonFileService implements ICommonFileService {

    @Autowired
    private ICommonFileManager commonFileManager;
    @Override
    public CommonFile selectCommonFileById(Long id) {
        return commonFileManager.selectCommonFileById(id);
    }

    @Override
    public List<CommonFile> selectCommonFileList(CommonFile commonFile) {
        return commonFileManager.selectCommonFileList(commonFile);
    }

    @Override
    public int insertCommonFile(CommonFile commonFile) {
        return commonFileManager.insertCommonFile(commonFile);
    }

    @Override
    public int updateCommonFile(CommonFile commonFile) {
        return commonFileManager.updateCommonFile(commonFile);
    }

    @Override
    public int deleteCommonFileByIds(String ids) {
        return commonFileManager.deleteCommonFileByIds(ids);
    }

    @Override
    public int deleteCommonFileById(Long id) {
        return commonFileManager.deleteCommonFileById(id);
    }

    @Override
    public CommonFile upload(MultipartFile file) throws Exception {
        return commonFileManager.upload(file);
    }

    @Override
    public CommonFile batchUpload(MultipartFile files) throws Exception {
        return commonFileManager.batchUpload(files);
    }
}
